Python Programming Fundamentals (Undergraduate Topics in Computer Science) by Kent D. Lee

Python Programming Fundamentals (Undergraduate Topics in Computer Science) by Kent D. Lee

Author:Kent D. Lee [Lee, Kent D.]
Language: eng
Format: epub, pdf
Publisher: Springer London
Published: 2015-01-07T08:00:00+00:00


4.7 Extracting Elements from an XML File

Each element in an XML document has a name. To extract an element you ask for all elements that match a given name. For the drawing application’s XML document format we start by getting the GraphicsCommands element.

The code above returns a list of all elements at the top-level of the document that match the tag name GraphicsCommands. We know there is only one of these elements in the file, so we can get just the first one by using index 0 into the list.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.